/*
 * sqlFunc.h
 *
 *  Created on: 18-Dec-2009
 *      Author: kollabia
 */

#ifndef SQLFUNC_H_
#define SQLFUNC_H_
#include<map>
#include<string>
#include<iostream>
#include<vector>
#include<stack>
#include<iomanip>
#include "../../Misc/Timer.h"
#include "../../Heap2/Heap.h"
#include "../../Index/BPlusTree.h"
//#include "../../yADBMS.h"
#include "../../common.h"
using namespace yadbms_common;
using namespace std;
extern Heap2 *heap;


typedef struct column_keyvalue{
	string name;
	string type;
	bool isnull;
	bool isindex;
	bool isdefault;
	string def;
}ckval;


void _create(string table,vector<ckval>);
void _drop(vector<string> tablelist);
void _select(string table,vector<string> columnlist,vector<int> condition,vector<string> l,vector<string> op,vector<string> r);
void _update(string table,map<string,string> col_table,vector<int> condition,vector<string> l,vector<string> op,vector<string> r);
void _insert(string table, vector<string> columns,vector<string> values);
void _delete(string table,vector<int> condition,vector<string> l,vector<string> op,vector<string> r);


#endif /* SQLFUNC_H_ */
